/*
 * @Description: 
 * @Author: Moqi
 * @Date: 2021-08-02 13:03:37
 * @Email: str@li.cm
 * @Github: https://github.com/strugglerx
 * @LastEditors: Moqi
 * @LastEditTime: 2021-09-07 20:43:10
 */
// <script src="./flexible.js"></script>
(function flexible(window, document) {
  // 1920/1080设计
  function resetFontSize() {
    const size = (document.documentElement.clientWidth / 1920) * 16;
    document.documentElement.style.fontSize = size + 'px';
  }

  // reset root font size on page show or resize
  window.addEventListener('pageshow', resetFontSize);
  window.addEventListener('resize', resetFontSize);
})(window, document);
